<?php

namespace App\Console\Commands;

use App\Common\SDK\Facade\FenZhangTong;
use Illuminate\Console\Command;

class GetFZTPaymentOrderDetail extends Command
{
    /**
     * 命令名称及签名
     *
     * @var string
     */
    protected $signature = 'utils:get_fzt_payment_order_detail {platPayId}';

    /**
     * 命令描述
     *
     * @var string
     */
    protected $description = '查询支付订单状态';

    public function handle()
    {
        $platPayId = $this->argument('platPayId');
        if (empty($platPayId)) {
            $this->output->error('订单号不能为空');
        }

        $this->output->success(json_encode(FenZhangTong::getPaymentOrderDetail(['platPayId' => $platPayId])));
    }
}
